package com.tepth.remote.ui.recycler.grid;

/**
 * Description:
 *
 * @author Hequn.Lee
 * @date 2018/10/19
 */
public final class GridItemBean {
    private final GridItemType TYPE;
    /**
     * 图标
     */
    private final CharSequence ICON;
    /**
     * 文字
     */
    private final CharSequence TITLE;

    public GridItemBean(GridItemType type, CharSequence icon, CharSequence title) {
        this.TYPE = type;
        this.ICON = icon;
        this.TITLE = title;
    }

    public CharSequence getIcon() {
        return ICON;
    }

    public CharSequence getTitle() {
        return TITLE;
    }

    public GridItemType getType() {
        return TYPE;
    }

    @Override
    public int hashCode() {
        return ICON.hashCode() + TITLE.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof GridItemBean) {
            final GridItemBean bean = (GridItemBean) obj;
            return TYPE == bean.getType();
        }
        return false;
    }
}
